package controler;

import bean.student;
import ui.StudentInfoManager;

import static dao.StudentDAO.selectStudent;
import static ui.StudentInfoManager.tableModel;

public class pagestart1 {
    public static void main(String[] args) {
        new StudentInfoManager();
        student s = new student();  // 创建一个学生对象
        selectStudent(1);// 查询id为1的学生
        s = selectStudent(1);// 查询id为1的学生
//        System.out.println(s.getName());
//        System.out.println(s.getAge());
//        System.out.println(s.getSex());
//        System.out.println(s.getClassName());
//        System.out.println(s.getId());

        //将s里的数据插入到数据库中
        tableModel.addRow(new Object[]{s.getId(), s.getName(), s.getAge(), s.getSex(), s.getClassName()});

    }
}
